<?php
// +----------------------------------------------------------------------
// | admin/v1【系统生成】   [ 2025-04-30 09:37:43 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2025 zhangqiquan All rights reserved.
// +----------------------------------------------------------------------
// | Author: zhangqiquan <768617998@qq.com>
// +----------------------------------------------------------------------
declare (strict_types=1);

use zhanshop\App;

App::route()->group("/action", function (){
      App::route()->rule("POST", "start", [\app\api\admin\v1\controller\Action::class, "start"]);
      App::route()->rule("POST", "startPv", [\app\api\admin\v1\controller\Action::class, "startPv"]);
      App::route()->rule("POST", "endPv", [\app\api\admin\v1\controller\Action::class, "endPv"]);
      App::route()->rule("POST", "register", [\app\api\admin\v1\controller\Action::class, "register"]);
      App::route()->rule("POST", "order", [\app\api\admin\v1\controller\Action::class, "order"]);
      App::route()->rule("POST", "pay", [\app\api\admin\v1\controller\Action::class, "pay"]);
      App::route()->rule("POST", "form", [\app\api\admin\v1\controller\Action::class, "form"]);
      App::route()->rule("POST", "share", [\app\api\admin\v1\controller\Action::class, "share"]);
      App::route()->rule("POST", "custom", [\app\api\admin\v1\controller\Action::class, "custom"]);
})->middleware([\zhanshop\server\middleware\SignAuth::class]);

App::route()->group("/ad", function (){
      App::route()->rule("GET", "listen", [\app\api\admin\v1\controller\Ad::class, "getListen"])->extra(["app","platform","event","token"]);
      App::route()->rule("POST", "listen", [\app\api\admin\v1\controller\Ad::class, "postListen"])->extra(["app","platform","event","token"]);
      App::route()->rule("GET", "ipv6", [\app\api\admin\v1\controller\Ad::class, "getIpv6"]);
});

App::route()->group("/index", function (){
      App::route()->rule("GET", "index", [\app\api\admin\v1\controller\Index::class, "getIndex"]);
      App::route()->rule("GET", "main", [\app\api\admin\v1\controller\Index::class, "getMain"]);
      App::route()->rule("GET", "echarts", [\app\api\admin\v1\controller\Index::class, "getEcharts"]);
      App::route()->rule("GET", "user", [\app\api\admin\v1\controller\Index::class, "getUser"]);
      App::route()->rule("POST", "user", [\app\api\admin\v1\controller\Index::class, "postUser"]);
      App::route()->rule("GET", "clean", [\app\api\admin\v1\controller\Index::class, "clean"]);
      App::route()->rule("GET", "config", [\app\api\admin\v1\controller\Index::class, "getConfig"])->extra(["id"]);
      App::route()->rule("POST", "config", [\app\api\admin\v1\controller\Index::class, "postConfig"])->extra(["id"]);
      App::route()->rule("GET", "table", [\app\api\admin\v1\controller\Index::class, "getTable"])->extra(["id"]);
      App::route()->rule("POST", "table", [\app\api\admin\v1\controller\Index::class, "postTable"])->extra(["id"]);
      App::route()->rule("GET", "ping", [\app\api\admin\v1\controller\Index::class, "getPing"]);
})->middleware([\app\middleware\AdminAuth::class]);

App::route()->group("/passport", function (){
      App::route()->rule("POST", "login", [\app\api\admin\v1\controller\Passport::class, "postLogin"]);
      App::route()->rule("GET", "test500", [\app\api\admin\v1\controller\Passport::class, "test500"]);
});

